package testPackage;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;

/**
 * step by step 01 启动浏览器代码段
 */
public class Selenium01 {
    public static void main(String[] args) {
        //创建一个driver对象
        WebDriver driver;
        //设置浏览器驱动的路径
        String driverPath = "D:\\Enviroments\\geckodriver-v0.26.0-win64\\chromedriver.exe";
        System.setProperty("webdriver.chrome.driver",driverPath);
//        DesiredCapabilities.chrome()
        //实例化对象并启动浏览器
        driver = new ChromeDriver();
        //打开网页
        driver.get("https://www.baidu.com/");
        //关闭浏览器
        driver.quit();
    }
}
